<?php
class Api extends Kernel {

    public function  __construct() {
        parent::__construct();
        $this->checkKEY();
    }

    private function checkKEY() {
        if ( $_POST[ 'api_key' ] != APP_API_KEY ) {
            echo json_encode( array( 'code' => '01', 'msg' => 'API_KEY 验证失败' ) );
            exit;
        }
    }
}